package com.eightbears.beboy.entity;

import com.eightbears.greendao.District;

import java.io.Serializable;

import static com.eightbears.beboy.base.cache.DistrictCache.CODE_CITY;


/**
 * Created by Bao on 2017/5/24.
 */

public class LocationEntity implements Serializable{

    private String latitude = "113.339307";
    private String longitude = "23.138772";
    private String parent_id = "440000";
    private String type = CODE_CITY;
    private String provinceId = "440000";
    private String provinceName = "广东省";
    private String districtId = "440106";
    private String districtName = "天河区";
    private String cityId = "440100";
    private String cityName = "广州市";
    private String homeCityId = "440100";
    private String homeCityName = "广州市";
    private String widthRadius;
    private String heightRadius;
    private String screenLat;
    private String screenLon;

    public String getHomeCityId() {
        return homeCityId;
    }

    public void setHomeCityId(String cityId) {
      this.homeCityId =cityId;
    }

    public String getHomeCityName() {
        return homeCityName;
    }

    public void setHomeCityName(String homeCityName) {
        this.homeCityName = homeCityName;
    }

    public String getScreenLat() {
        return screenLat;
    }

    public void setScreenLat(String screenLat) {
        this.screenLat = screenLat;
    }

    public String getScreenLon() {
        return screenLon;
    }

    public void setScreenLon(String screenLon) {
        this.screenLon = screenLon;
    }

    public String getHeightRadius() {
        return heightRadius;
    }

    public void setHeightRadius(String heightRadius) {
        this.heightRadius = heightRadius;
    }

    public String getWidthRadius() {
        return widthRadius;
    }

    public void setWidthRadius(String widthRadius) {
        this.widthRadius = widthRadius;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getParent_id() {
        return parent_id;
    }

    public void setParent_id(String parent_id) {
        this.parent_id = parent_id;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getProvinceId() {
        return provinceId == null ? "" : provinceId;
    }

    public void setProvinceId(String provinceId) {
        this.provinceId = provinceId;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getDistrictId() {
        return districtId == null ? "" : districtId;
    }

    public void setDistrictId(String districtId) {
        this.districtId = districtId;
    }

    public String getDistrictName() {
        return districtName;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    public String getCityId() {
        return cityId == null ? "" : cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return cityName == null ? "广州" : cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public void praesEntity(District district){
        setCityName(district.getName());
        setCityId(district.getId());
        setParent_id(district.getParent_id());
        setType(district.getType());
    }

    @Override
    public String toString() {
        return "LocationEntity{" +
                "latitude='" + latitude + '\'' +
                ", longitude='" + longitude + '\'' +
                ", parent_id='" + parent_id + '\'' +
                ", type='" + type + '\'' +
                ", provinceId='" + provinceId + '\'' +
                ", provinceName='" + provinceName + '\'' +
                ", districtId='" + districtId + '\'' +
                ", districtName='" + districtName + '\'' +
                ", cityId='" + cityId + '\'' +
                ", cityName='" + cityName + '\'' +
                ", homeCityId='" + homeCityId + '\'' +
                ", homeCityName='" + homeCityName + '\'' +
                ", widthRadius='" + widthRadius + '\'' +
                ", heightRadius='" + heightRadius + '\'' +
                ", screenLat='" + screenLat + '\'' +
                ", screenLon='" + screenLon + '\'' +
                '}';
    }
}
